#ifndef  _GAME_H_
#define _GAME_H_

#include "SDL\SDL.h"

#include "Sprite.h"

#include <vector>

class GameState; // make sure this class knows about the GameState class.

class Game
	{
	public:
		
		Game();
		SDL_Surface* GetScreen() {return m_pScreen;}

		void Init(const char* title, int width, int height, 
				  int bpp, bool fullscreen);
		
		void ChangeState(GameState* state); // new function
		void PushState(GameState* state);  // new function
		void PopState(); // new function
		
		void HandleEvents(); // remove pointer to game class
		
		void Update();
		
		void Draw();
		
		void Clean();
		
		bool Running() { return m_bRunning; }
		void Quit() { m_bRunning = false; }
		

		
		// the stack of states
		std::vector<GameState*> states;
		
		SDL_Surface* m_pScreen;
		
		bool m_bFullscreen;
		bool m_bRunning;
		
};
#endif
